package com.four.collage.feign;

import com.guli.common.utils.R;
import com.guli.common.vo.ManageVo;
import com.guli.common.vo.ParameterVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @Author:wsy
 * @Date: 2021/12/14/15:22
 * @Description
 */
@FeignClient("four-shop")
@RequestMapping("shop")
public interface ShopFeginService {

    /**
     * 查询所有的商品
     * @return
     */
    @GetMapping("/manage/findAllManage")
    public List<ManageVo> findAllManage();

    /**
     * 根据id查询商品
     * @param id
     * @return
     */
    @GetMapping("/manage/getManageById/{id}")
    public ManageVo getManageById(@PathVariable(value = "id") Integer id) ;

    /**
     * 根据id查询图片
     * @param id
     * @return
     */
    @GetMapping("/pricture/getPictureById/{id}")
    public R getPictureById(@PathVariable("id")Integer id);

    /**
     * 根据商品id查询商品属性
     * @param manId
     * @return
     */
    @GetMapping("/parameter/findParameterById/{id}")
    public List<ParameterVo> findParameterById(@PathVariable("id") Integer manId);

}
